package cc.mrbird.febs.accounting.service;

import cc.mrbird.febs.accounting.entity.Project;

import cc.mrbird.febs.common.entity.QueryRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 *  Service接口
 *
 * @author baoyinlei
 * @date 2021-09-28 23:26:45
 */
public interface IProjectService extends IService<Project> {
    /**
     * 查询（分页）
     *
     * @param request QueryRequest
     * @param project project
     * @return IPage<Project>
     */
    IPage<Project> queryProjects(QueryRequest request, Project project);

    /**
     * 查询（所有）
     *
     * @param project project
     * @return List<Project>
     */
    List<Project> findProjects(Project project);

    /**
     * 查询（最近进行）
     *
     * @return List<Project>
     */
    List<Project> findOngoingProjects();

    /**
     * 新增
     *
     * @param project project
     */
    Boolean createProject(Project project);

    /**
     * 修改
     *
     * @param project project
     */
    Boolean updateProject(Project project);

    /**
     * 删除
     *
     * @param projectIds projectIds
     */
    void deleteProject(String projectIds);

    List<Project> getProjectByCompanyId(Long companyId);

    Project getProjectById(Long projectId);

    List<Project> getProjectByIds(List<String> projectIds);

    void updateProjectComment(Long projectId, String comment);

    void updateProjectComment2(Long projectId, String comment);
}
